<?php
namespace SimpleMVC\lib;

use SimpleMVC\SimpleMVC;

class Controller extends View {
	
	private $CONFIG;
	
	public function __construct()
	{
		//获取系统配置
		$this->CONFIG = SimpleMVC::getConfig();
	}
	
	protected function getConfig($key = null)
	{
		if ($key === null) {
			return $this->CONFIG;
		} else if (isset($this->CONFIG[$key])) {
			return $this->CONFIG[$key];
		} else {
			return null;
		}
	}
}